<template>
  <div>
    <!--查看和审批对话框-->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!--        <el-form-item label="请假类型" prop="type">-->
<!--          <el-select v-model="form.type" :disabled="taskName!=='调整申请'">-->
<!--            <el-option-->
<!--              v-for="dict in typeOptions"-->
<!--              :key="dict.dictValue"-->
<!--              :label="dict.dictLabel"-->
<!--              :value="dict.dictValue"-->
<!--            ></el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="名称" prop="fName">
          <el-input v-model="form.fName" :readonly="taskName!=='调整申请'" />
        </el-form-item>
        <el-form-item label="建设内容" prop="fContent">
          <el-input v-model="form.fContent" type="textarea" :readonly="taskName!=='调整申请'" />
        </el-form-item>
        <el-form-item label="所在区县" prop="fXzqdm">
          <el-input v-model="form.fXzqdm" type="textarea" :readonly="taskName!=='调整申请'" />
        </el-form-item>
        <el-form-item label="申请人" prop="applyUserName">
          <el-input v-model="form.applyUserName" readonly />
        </el-form-item>
        <el-form-item label="申请时间" prop="applyTime">
          <el-date-picker clearable size="small" style="width: 200px"
                          v-model="form.applyTime"
                          type="date"
                          value-format="yyyy-MM-dd"
                          readonly>
          </el-date-picker>
        </el-form-item>
        <!--<el-form-item label="流程实例ID" prop="instanceId">
          <el-input v-model="form.instanceId" readonly />
        </el-form-item>-->
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" type="textarea" :readonly="taskName!=='调整申请'" />
        </el-form-item>
      </el-form>
      <view-verify
        :open.sync="open"
        :row="row"
        :taskId="taskId.toString()"
        :taskName="taskName"
        :type="type"
      />
    </el-dialog>
  </div>
</template>

<script>
  import ViewVerify from "@/components/Activiti/ViewVerify/ViewVerify";

  export default {
    name: "gbzcbForm",
    components: {
      ViewVerify,
    },
    props: {
      row: {
        type: Object,
      },
      taskId: {
        type: String,
      },
      taskName: {
        type: String,
      },
      type: {
        type: String,
        default: 'none',
      },
    },
    data() {
      return {
        title: '查看高标准储备申报表单',
        form: this.row,
        open: false,
        // 请假类型字典
        typeOptions: [],
        // 表单校验
        rules: {
          type: [
            { required: true, message: "请假类型不能为空", trigger: "blur" },
          ],
          fName: [
            { required: true, message: "标题不能为空", trigger: "blur" },
          ],
          fContent: [
            { required: true, message: "原因不能为空", trigger: "blur" },
          ],
          fXzqdm: [
            { required: true, message: "区县不能为空", trigger: "blur" },
          ],

        },
      }
    },
    created() {
      // this.getDicts("biz_leave_type").then(response => {
      //   this.typeOptions = response.data;
      // });
    },
  }
</script>

<style scoped>

</style>
